#ifndef RATIONALHANDLE_H
#define RATIONALHANDLE_H
#include "curves/rationalcurveitem.h"
#include "handles/handle.h"

namespace curveLib
{
    template<class IPoint, class Container>
    class IRational;
}

typedef curveLib::IRational<QPointF, QVector<QPointF> > IRatioF;

class QGraphicsSceneWheelEvent;
class QGraphicsSceneMouseEvent;

class RationalHandle : public Handle
{
public:
    enum { Type = UserType + 2 };
    RationalHandle(RationalCurveItem *curve, int i, qreal radius);

    void RaiseWeight();
    void LowerWeight();

protected:
    void wheelEvent(QGraphicsSceneWheelEvent *event);
    QVariant itemChange(GraphicsItemChange change, const QVariant &value);
//    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);

private:
    RationalCurveItem *m_curve;
    IRatioF *m_numCurve;
};

#endif // RATIONALHANDLE_H
